# Maintainer: Guillaume Cocatre-Zilgien <guillaume at cocatre dot net>

pkgname='caudec'
pkgver='1.6.0'
pkgrel='1'
pkgdesc='a multi-process command-line audio transcoder'
arch='any'
url='http://caudec.googlecode.com/'
license=('GPL3')
depends=('bash' 'procps-ng' 'grep' 'bc' 'which' 'coreutils' 'shntool' 'sed' 'findutils' )
optdepends=(
	'sox: resampling support / applying gain'
	'flac: FLAC encoding and decoding'
	'flake: alternative FLAC encoder'
	'wavpack: WavPack encoding and decoding'
	"mac: Monkey's Audio encoding and decoding"
	'alac_decoder: Apple Lossless decoding'
	'ffmpeg: Apple Lossless encoding'
	'lame: MP3 encoding'
	'vorbis-tools: Ogg Vorbis encoding'
	'neroaacenc: Nero AAC encoding'
	'neroaactag: Nero AAC tagging'
	'neroaacdec: Nero AAC decoding (and Replaygain)'
	'musepack-tools: Musepack encoding'
	'opus-tools: Opus encoding'
	'apetag: APEv2 tagging'
	'wine: Windows codecs support (TAK, lossyWAV, qaac, etc)'
	'cksfv: CRC32 hashing'
	"wavegain: Replaygain for Monkey's Audio, TAK, ALAC"
	'vorbisgain: Replaygain for Ogg Vorbis'
	'mp3gain: Replaygain for MP3'
	'aacgain-cvs: Replaygain for AAC'
	'gawk: required for SoundCheck support'
	'python2-eyed3: for MP3 artwork and Replaygain support'
)
backup=('etc/caudecrc')
source=("http://caudec.googlecode.com/files/${pkgname}-${pkgver}.tar.gz")
sha1sums=('db19e95690ed929d5a143c8f9c709876faef277f')

package ()
{
	cd "${srcdir}/${pkgname}-${pkgver}"
	install -D -m 0755 'caudec' "${pkgdir}/usr/bin/caudec"
	ln -s 'caudec' "${pkgdir}/usr/bin/decaude"
	install -D -m 0644 'caudecrc' "${pkgdir}/etc/caudecrc"
}
